<template>
	<view class="  text-df" style="line-height: 50rpx;width: 100%;">

		<view style="text-align: center; " class="text-bold">{{content.agreementName}}</view>
		<view class="  text-df padding-top-xs" style="line-height: 50rpx;overflow-y: auto; height: 354px;">
			<uv-parse :content="content.content"></uv-parse>
		</view>

		<loading></loading>
	</view>
</template>

<script>
	import {
		getAgreement
	} from '../../api/agreement/agreement'

	export default {
		props: {
			num: {
				type: Number,
				default: 3
			}
		},
		data() {
			return {
				title: [
					'共享清单',
					'敏感个人信息知情同意书',
					'隐私政策'
				],
				content: {
					agreementName: "隐私政策",
					agreementStatus: "1",
					content: ''
				}
			}
		},
		mounted() {
			console.log('num' + this.title[this.num - 1])
			getAgreement(this.title[this.num - 1]).then(res => {
				// console.log(JSON.stringify(res))
				if (res.code == 200) {
					this.content.agreementName = res.data.agreementName
					this.content.agreementStatus = res.data.agreementStatus
					this.content.content = res.data.content
				}
			})
		},
		methods: {
			waibuhttp() {
				uni.navigateTo({
					url: "https://posts.tenpay.com/posts/3b020ca36008eb660046aad41d458236.html"
				})
			}
		}
	}
</script>

<style>
	a:link,
	a:visited {
		color: black;
		width: 300px;
		text-decoration: underline;
		cursor: auto;
	}

	a:link:active,
	a:visited:active {
		color: black;
	}
</style>